const seq = require('sequelize')
const time = require('../time')

module.exports = {
  NAME: 'data_api',
  TABLE: {
    data_api_id: {
      type: seq.INTEGER(11),
      primaryKey: true,
      unique: true,
      autoIncrement: true,
      comment: 'data_api_id 主键，自增',
      field: 'data_api_id' //  相应的字段名称
    },
    name: {
      type: seq.STRING(64),
      comment: 'api名称',
      field: 'name'
    },
    server: {
      type: seq.STRING(255),
      comment: '主机地址或IP地址',
      field: 'server'
    },
    methods: {
      type: seq.STRING(15),
      comment: '请求方式(get,post,put,delete)',
      field: 'methods'
    },
    remark: {
      type: seq.TEXT,
      comment: '备注',
      field: 'remark',
    },
    Params: {
      type: seq.STRING(255),
      comment: 'Params',
      field: 'Params'
    },
    Headers: {
      type: seq.STRING(255),
      comment: 'Headers',
      field: 'Headers'
    },
    Body: {
      type: seq.STRING(255),
      comment: 'Body',
      field: 'Body'
    },
    ...time.create_date,
    ...time.update_date,
    ...time.delete_date,
    ...time.create_by,
    ...time.update_by,
    ...time.delete_by
  }
}
